package campus.aiit.ssl.domain.param;

/**
 * @author ihaokun
 * @date 2019/12/13 10:13
 */
public enum BadStatusEnum {
  BASE_EXCEPTION(1),

  IN_PARAM_EXCEPTION(11),// In param not present or others cause

  SERVICE_EXCEPTION(21),

  BINDING_EXCEPTION(31),// MyBatis Binding Exception
  DAO_PROCESS_EXCEPTION(41),// DAO statement perform exception
  DAO_RESULT_EXCEPTION(51), // DAO return result not excepted

  MODBUS_EXCEPTION(61);

  int code;
  public int getCode() {
    return code;
  }

  BadStatusEnum() {
  }
  BadStatusEnum(int code) {
    this.code = code;
  }

  @Override
  public String toString() {
    return String.valueOf(code);
  }
}